load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "azure_storage_common_cpp",
    srcs = glob([
        "src/**/*.hpp",
        "src/**/*.cpp",
    ]),
    hdrs = glob(["inc/**/*.hpp"]),
    includes = ["inc"],
    linkopts = select({
        "@platforms//os:windows": [
            "bcrypt.lib",
            "webservices.lib",
        ],
        "//conditions:default": [],
    }),
    visibility = ["//visibility:public"],
    deps = [
        "@azure-core-cpp//:azure_core_cpp",
    ] + select({
        "@platforms//os:windows": [],
        "//conditions:default": [
            "@libxml2",
            "@openssl//:crypto",
            "@openssl//:ssl",
        ],
    }),
)

# TODO: all the tests in this lib require a test proxy to be running, so we
# don't have a cc_test for now:
# https://github.com/Azure/azure-sdk-for-cpp/blob/main/doc/TestProxy.md
